import request from '@/utils/request'
/**
 * 小区内容渲染
 */
export function getCommunityApi() {
  return request({
    url: '/community'
  })
}

/**
 * 获取车位列表
 */
export function getparkinglistApi(params) {
  return request({
    method: 'GET',
    url: '/parking/index',
    params
  })
}

/**
 * 删除
 */
export function delparkinglistApi(id) {
  return request({
    method: 'DELETE',
    url: `/parking/index/${id}`
  })
}
/**
 * 新增
 */
export function addparkinglistApi(data) {
  return request({
    method: 'POST',
    url: '/parking/index',
    data
  })
}
/**
 * 回显
 */
export function getshowparkinglistApi(params) {
  return request({
    method: 'GET',
    url: '/parking/index',
    params
  })
}
/**
 * 修改
 */
export function editparkinglistApi(data) {
  return request({
    method: 'PUT',
    url: `/parking/index/${data.id}`,
    data
  })
}
